﻿@using PlatformNetCore.Entity;
@using Webdiyer.AspNetCore;
@model DataCenterInfo

<div class="banner banner-about" style="background-image:url(@(Model.Ad != null && !string.IsNullOrWhiteSpace(Model.Ad.AdImagePC) ? Model.Ad.AdImagePC:"/img/banner/data.jpg"))">
    <div class="txt">
        <div class="nav-container">
            <h1 class="text28 wow fadeInUp">@ViewBag.ParentTitle</h1>
            <ul class="nav wow fadeInUp">
                @foreach (Menu item in ViewBag.MenuTopSecond)
                {
                    <li><a href="@item.Link" class="@(item.MenuCode.Equals(ViewBag.MenuCode)?"active":"")">@item.Title</a></li>
                }
            </ul>
        </div>
    </div>
</div>

<div class="page page-documents">
    <section class="doclist container">
        @foreach (var item in Model.NewsList)
        {
            <div class="item">
                <h3 class="text20 wow fadeInUp">
                    @*<a href="@item.CoverImage" target="_blank">@item.Title</a>*@
                    @item.Title
                </h3>
                <div class="row wow fadeInUp">
                    <div class="col">
                        <div class="source">来自：@(!string.IsNullOrWhiteSpace(item.Source)?item.Source:"未知")</div>
                    </div>
                    <div class="col-auto">
                        <div class="time">@item.PublishDate.Value.ToString("yyyy.MM.dd")</div>
                    </div>
                </div>
            </div>
        }

        <footer class="news-footer wow fadeInUp">
            @Html.Pager((IPagedList)Model.NewsList, new PagerOptions()
            {
                    ShowFirstLast = false,
                    PrevPageText = "<",
                    NextPageText = ">",
                    PageIndexParameterName = "pageindex",
                    NumericPagerItemCount = 5,
                    CssClass = "pagination text-center",
                    CurrentPagerItemTemplate = "<li class=\"page-item active\"><a class=\"page-link\" href=\"javascript:;\">{0}</a></li>",
                    DisabledPagerItemTemplate = "<li class=\"page-item disabled\"><a class=\"page-link\" href=\"javascript:;\">{0}</a></li>",
                    PagerItemTemplate = "<li class=\"page-item\">{0}</li>"
            })
        </footer>
    </section>
</div>

